package com.design.pattern.stratogy;

import com.design.pattern.stratogy.behavior.FlyWithWings;
import com.design.pattern.stratogy.duck.MallardDuck;

public class PatternTest {
    public static void main(String[] args) {
        Duck duck = new MallardDuck();
//        Duck duck = new RubberDuck();
        duck.swim();
        duck.performFly();
        duck.performQuack();
        duck.display();
        duck.setFlyBehavior(new FlyWithWings());
        duck.swim();
        duck.performFly();
        duck.performQuack();
        duck.display();
    }
}